home *** CD-ROM | disk | FTP | other *** search
/ C & C++ Multimedia Cyber Classroom / C and C++ Multimedia Cyber Classroom (Prentice Hall) (1998).iso / src / fig20_38.jar / Ch20 / Fig20_38 / fig20_38.cpp
C/C++ Source or Header  |  1997-10-22  |  444b  |  17 lines

  1. // Fig. 20.38: fig20_38.cpp
  2. // Demonstrating min and max
  3. #include <iostream>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.    cout << "The minimum of 12 and 7 is: " << min( 12, 7 );
  11.    cout << "\nThe maximum of 12 and 7 is: " << max( 12, 7 );
  12.    cout << "\nThe minimum of ÆGÆ and ÆZÆ is: " 
  13.         << min( ÆGÆ, ÆZÆ );
  14.    cout << "\nThe maximum of ÆGÆ and ÆZÆ is: " 
  15.         << max( ÆGÆ, ÆZÆ ) << endl;
  16.    return 0;
  17. }